package com.lanyun.aicorrectassistant.basic.service.impl;

import com.lanyun.aicorrectassistant.basic.dao.UserApiKeyDao;
import com.lanyun.aicorrectassistant.basic.entity.UserApiKey;
import com.lanyun.aicorrectassistant.basic.service.UserApiKeyService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import java.util.List;

/**
 * 用户API密钥存储表(UserApiKey)服务实现
 *
 * @author Jqchan
 * @since 2025-05-29 23:26:37
 */
@Service
public class UserApiKeyServiceImpl implements UserApiKeyService {
    
    @Resource
    private UserApiKeyDao userApiKeyDao;

    @Override
    public UserApiKey queryById(Integer id) {
        return userApiKeyDao.queryById(id);
    }

    @Override
    public UserApiKey queryByCondition(UserApiKey condition) {
        return userApiKeyDao.queryByCondition(condition);
    }

    @Override
    public List<UserApiKey> queryAllByCondition(UserApiKey condition) {
        return userApiKeyDao.queryAllByCondition(condition);
    }

    @Override
    public List<UserApiKey> page(UserApiKey condition, int page, int pageSize) {
        return userApiKeyDao.page(condition, page, pageSize);
    }

    @Override
    public int insert(UserApiKey entity) {
        return userApiKeyDao.insert(entity);
    }

    @Override
    public int update(UserApiKey entity) {
        return userApiKeyDao.update(entity);
    }

    @Override
    public int deleteById(Integer id) {
        return userApiKeyDao.deleteById(id);
    }

    @Override
    public Long count(UserApiKey condition) {
        return userApiKeyDao.count(condition);
    }
}
